from frappe import _

def after_migrations():
    # 确保覆盖文件被优先加载
    from frappe.utils import get_bench_path
    import os, time
    
    bench_path = get_bench_path()
    js_file = os.path.join(bench_path, "sites", "assets", "light_theme", "js", "override_number_format.js")
    
    # 更新文件时间戳确保重建
    if os.path.exists(js_file):
        os.utime(js_file, None)
        print("[Light Theme] Forced JS override reload")